<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
	<title>Promise testDemo</title>
	<style type="text/css">
	* {
		padding: 0;
		margin: 0;
	}
	
</style>
</head>
<body>
	<h1>aaaa</h1>
</body>
<script src="index.js"></script>
<script type="text/javascript">
 
const p1 = new Promise((resolve, reject) => {
  // resolve("fulfilled");
  reject("rejected");
});
console.log(p1)

const p2 = new Promise(resolve => {
  console.log("p1", p1)

  resolve(p1);
}).then(
  value => {
    console.log(value);
    return '111';
  },
  reason => {
    console.warn(reason);
    return '3333';
  }
);

console.log("p2", p2)


</script>
</html>